#pragma once
#include <curl/curl.h>
#include <curl/types.h>
#include <curl/easy.h>
#include <string>

class DownloadManager
{
public:
    DownloadManager(void);
    ~DownloadManager(void);
    void PerformDownload(void);

    // Input params
    unsigned long ulMaxFileSize;
    unsigned long ulMaxRedirsCount;
    std::string szUrl;
    std::string szFormContent;
    std::string szCookies;
    std::string szUserAgent;
    std::string szReferenceUrl;
    std::string szProxyAddr;
    std::string szProxyAuth;
    std::string szHttpAuth;

    // Output params
    CURLcode curlCode;
    std::string szCurlMessage;
    std::string szResource;
    std::string szResponseHeader;
    double dSizeDownload;
    double dSpeedDownload;
    double dTotalTime;
    std::string szEffectiveUrl;
    unsigned long ulResponseCode;
};
